#ifndef BIOTABLEWIDGET_H
#define BIOTABLEWIDGET_H

#include <QGraphicsWidget>
#include <QString>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QGraphicsProxyWidget>
#include <QFile>
#include <QDebug>
#include <QPainter>
#include <QPointer>

class QualAttributeSet;
class QualAttribute;

class BioTableWidget : public QGraphicsWidget
{
    Q_OBJECT
public:
    BioTableWidget(QString filename, QGraphicsItem* parent = 0);

    QRectF boundingRect() const;
    QPainterPath shape() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);

   void getElements(int col, QList<QString>& elts);
   void getAttributeSets(QVector< QPointer <QualAttributeSet> > & attSets);

protected:
    QTableWidget* table;
    QGraphicsProxyWidget *proxy_table;

signals:

public slots:

private:
    bool readFileIntoTable(QString filename);
    int rowCount;
    int columnCount;
    QString filename;
    QVector< QPointer<QualAttributeSet> > attributeSets;

    void createAttributeSets();
};

#endif // BIOTABLEWIDGET_H
